<template>
  <div id="cabinet">
    <div class="cab">
      <div class="faild isNormal">缺货中...</div>
      <div class="text">
        <h4>房间306</h4>
        <span>柜机编号：95124587</span>
        <div class="status outline">离线</div>
      </div>
      <router-link
      :to="{name: 'Quehuo'}"
      tag="div"
      class="watch">
        <p>查看详情</p>
        <img src="../../../assets/youjiantou.png" alt="">
      </router-link>
    </div>
    <div class="cab">
      <div class="faild isNormal">缺货中...</div>
      <div class="text">
        <h4>房间312</h4>
        <span>柜机编号：95124587</span>
        <div class="status inline">在线</div>
      </div>
      <div class="watch">
        <p>查看详情</p>
        <img src="../../../assets/youjiantou.png" alt="">
      </div>
    </div>
    <div class="cab">
      <div class="success isNormal">正常</div>
      <div class="text">
        <h4>房间308</h4>
        <span>柜机编号：95124587</span>
        <div class="status outline">离线</div>
      </div>
      <div class="watch">
        <p>查看详情</p>
        <img src="../../../assets/youjiantou.png" alt="">
      </div>
    </div>
    <div class="cab">
      <div class="success isNormal">正常</div>
      <div class="text">
        <h4>房间205</h4>
        <span>柜机编号：95124587</span>
        <div class="status inline">在线</div>
      </div>
      <div class="watch">
        <p>查看详情</p>
        <img src="../../../assets/youjiantou.png" alt="">
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Cabinet',
  created () {
    document.title = '柜机信息'
  }
}
</script>

<style lang='scss' scoped>
#cabinet{
  height: 100%;
  padding: 4vw 3.46vw 0 3.46vw;
  .cab{
    height: 64.26vw;
    background-color: #fff;
    padding: 15.2vw 0 0 3.46vw;
    box-sizing: border-box;
    position: relative;
    margin-bottom: 4vw;
    .isNormal{
      height: 7.73vw;
      text-align: center;
      line-height: 7.73vw;
      color: #fff;
      border-top-right-radius: 4vw;
      border-bottom-right-radius: 4vw;
      position: absolute;
      top: 3vw;
      left: 0;
      font-size: 4.53vw;
      font-weight: bold;
      font-family: SourceHanSansCN-Bold;
      &.success{
        width: 16vw;
        background-color: #0A6DFF;
      }
      &.faild{
        width: 25.06vw;
        background-color: #f00;
      }
    }
    .text{
      height: 33.33vw;
      border-top: 1px solid #eee;
      border-bottom: 1px solid #eee;
      position: relative;
      h4{
        color: rgba(22,22,22,1);
        margin: 8vw 0 5.33vw 0;
        box-sizing: border-box;
        font-size: 7.46vw;
        font-family:SourceHanSansCN-Bold;
        font-weight:bold;
        color:rgba(22,22,22,1);
      }
      span{
        font-size: 4.53vw;
        font-weight: 400;
        color: rgba(168,168,168,1);
        font-family:SourceHanSansCN-Regular;
      }
      .status{
        width: 14.44vw;
        height: 7.73vw;
        text-align: center;
        line-height: 7.73vw;
        border-radius: 0.8vw;
        font-size: 4.53vw;
        font-family:SourceHanSansCN-Bold;
        font-weight:bold;
        position: absolute;
        right: 3.46vw;
        top: 17.6vw;
        &.outline{
          color:rgba(255,0,0,1);
          background-color: #FFF5F5;
        }
        &.inline{
          color:rgba(10,109,255,1);
          background-color: #F3F8FF;
        }
      }
    }
    .watch{
      height: 15.2vw;
      padding: 0 3.46vw 0 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
      p{
        font-family:SourceHanSansCN-Regular;
        font-size: 4.53vw;
        font-weight: 400;
        color: rgba(22,22,22,1);
      }
      img{
        width: 2.4vw;
        height: 4.26vw;
      }
    }
  }
}
</style>
